package org.classg.eduservice.easyExcelTest;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;

import java.util.Map;

// 创建读取excel监听器
public class ExcelListener extends AnalysisEventListener<Student> {

    // 一行一行去读取Excel内容
    @Override
    public void invoke(Student student, AnalysisContext analysisContext) {
        System.out.println(student+"内容");
    }

    // 读取Excel表头信息
    @Override
    public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
        System.out.println(headMap+"表头信息");
    }

    // 读取完成后执行
    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }

}
